{% extends 'base.html' %}
{% block header %}
    <link rel="stylesheet" href="{{ url_for('static',filename='css/base.css') }}">
{% endblock header %}
{% block content %}
    <!-- Main content -->
    <div class="content">
        {#<div class="modal modal-success fade" id="modal-success" style="display: none;">#}
        {#          <div class="modal-dialog">#}
        {#            <div class="modal-content">#}
        {#              <div class="modal-header">#}
        {#                <button type="button" class="close" data-dismiss="modal" aria-label="Close">#}
        {#                  <span aria-hidden="true">×</span></button>#}
        {#                <h4 class="modal-title">通知</h4>#}
        {#              </div>#}
        {#              <div class="modal-body">#}
        {#                {% for msg in get_flashed_messages(category_filter=["ok"]) %}#}
        {#                        <h4>{{ msg }}</h4>#}
        {#                {% endfor %}#}
        {#              </div>#}
        {#              <div class="modal-footer">#}
        {#                <button type="button" class="btn btn-outline pull-right" data-dismiss="modal">Close</button>#}
        {#              </div>#}
        {#            </div>#}
        {#            <!-- /.modal-content -->#}
        {#          </div>#}
        {#          <!-- /.modal-dialog -->#}
        {#        </div>#}
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#" data-toggle="tab" aria-expanded="true">{{ title }}</a></li>
            </ul>
            <!-- Default box -->
            <div class="box">
                {% for msg in get_flashed_messages(category_filter=["ok"]) %}
                    <div class="alert alert-success alert-dismissible">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                        <h4><i class="icon fa fa-check"></i> 操作成功！</h4>
                        {{ msg }}
                    </div>
                {% endfor %}
                {% for msg in get_flashed_messages(category_filter=["error"]) %}
                    <div class="alert alert-danger alert-dismissible">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                        <h4><i class="icon fa fa-ban"></i>操作失败！</h4>
                        {{ msg }}
                    </div>
                {% endfor %}
                <form class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{{ form.tyname.label }}</label>
                        <div class="col-sm-10">
                            {{ form.tyname(value=arctype.tyname) }}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{{ form.keywords.label }}</label>
                        <div class="col-sm-10">
                            {{ form.keywords(value=arctype.keywords) }}
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            {{ form.csrf_token }}
                            {{ form.submit }}
                        </div>
                    </div>
                </form>
            </div>
            <!-- /.tab-pane -->
        </div>
        <!-- /.tab-content -->
    </div>
    <!-- /.content -->

{% endblock content %}